package com.pzhu.controller.impl;

import com.pzhu.controller.BookController;
import com.pzhu.pojo.Book;
import com.pzhu.service.BookService;
import com.pzhu.service.impl.BookServiceImpl;

import java.util.List;

public class BookControllerImpl implements BookController {
    private BookService bookService = new BookServiceImpl();
    @Override
    public int addBook(Book book) {
        return bookService.addBook(book);
    }

    @Override
    public long deleteBook(Long id) {
        return bookService.deleteBook(id);
    }

    @Override
    public Book selectBook(Long id) {
        return bookService.selectBook(id);
    }

    @Override
    public List<Book> selectAllBook() {
        return bookService.selectAllBook();
    }

    @Override
    public int updateBook(Book book) {
        return bookService.updateBook(book);
    }

    @Override
    public long selectLastId() {
        return bookService.selectLastId();
    }
}
